package org.ncibi.cytoscape.metscape.network;

import org.ncibi.cytoscape.metscape.data.Attributes;
import org.ncibi.metab.network.attribute.ReactionAttribute;
import org.ncibi.metab.network.node.MetabolicNode;
import org.ncibi.metab.network.node.ReactionNode;

public class ReactionNodeTranslator extends AbstractNodeTranslator {

	@Override
    public String getCanonicalName(MetabolicNode node) {
    	return node.getId();
    }

	@Override
	public void addAttributes(String id, MetabolicNode node) {
		Attributes.node.setAttribute(id, ReactionAttribute.PATHWAY.toAttributeName(),
                ReactionNode.getPathway(node));
		Attributes.node.setAttribute(id, ReactionAttribute.REVERSIBLE.toAttributeName(),
				ReactionNode.isReversible(node));
		Attributes.node.setAttribute(id, ReactionAttribute.RID.toAttributeName(),
				ReactionNode.getRid(node));
		Attributes.node.setAttribute(id, ReactionAttribute.EQUATION.toAttributeName(),
				ReactionNode.getEquation(node));
		Attributes.node.setListAttribute(id, ReactionAttribute.LOCATIONS.toAttributeName(),
				ReactionNode.getLocations(node));
	}



}
